<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="pragma" content="no-cache" />
        <meta http-equiv="cache-control" content="no-cache" />
        <meta http-equiv="expires" content="0" />
        <title></title>
        <link rel="stylesheet" rev="stylesheet" href="{{$http_url}}/css/style.css" type="text/css" media="all" />
    </head>

    <body class="ContentBody">
        <form action="{{$http_url}}/createadmin/addAdminUser/" method="post"  name="form" >
            <div class="MainDiv">
                <table width="99%" border="0" cellpadding="0" cellspacing="0" class="CContent">
                    <tr>
                        <th class="tablestyle_title" >添加新管理员</th>
                    </tr>
                    <tr>
                        <td class="CPanel">
                            <table border="0" cellpadding="0" cellspacing="0" style="width:100%">
                                <tr>
                                    <td width="100%">
                                        <fieldset style="height:100%;">
                                            <legend>管理员信息</legend>
                                            <table border="0" cellpadding="2" cellspacing="1" style="width:100%">
                                                <tr>
                                                    <td nowrap align="right" width="15%">用户名:</td>
                                                    <td width="35%"><input id="txtusername" name='txtusername' type="text" class="text" style="width:154px" />
                                                        <span class="red">*</span></td>
                                                </tr>
                                                <tr>
                                                    <td nowrap align="right" width="15%">密码:</td>
                                                    <td width="35%"><input id="txtpassword" name='txtpassword' type="password" class="text" style="width:154px" onpaste="return false" />
                                                        <span class="red">* {{$pwdTxt.txt}},{{$pwdTxt.length}}位</span></td>
                                                </tr>
                                                <tr>
                                                    <td nowrap align="right" width="15%">确认密码:</td>
                                                    <td width="35%"><input id="txtpassword_confirm" name='txtpassword_confirm' type="password" class="text" style="width:154px"  onpaste="return false" />
                                                        <span class="red">*</span></td>
                                                </tr>
                                                <br>
                                            </table>
                                            <br />
                                        </fieldset></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center" height="50px">
                            <input id="submit" type="submit" name="submit" value="保存" class="button" />　
                            <input type="button" name="Submit2" value="返回" class="button" onclick="window.history.go(-1);"/>
                        </td>
                    </tr>
                </table>
            </div>
        </form>
        <script type="text/javascript" src="{{$http_url}}/js/jquery.min.js"></script>
        <script type="text/javascript" src="{{$http_url}}/js/authentication.js"></script>
        <script type="text/javascript">
            $(document).ready(function(){
                $("#submit").click(function(){
                    if(authentication.isEmpty($("#txtusername").val())){
                        alert("请输入用户名!");
                        return false;
                    }
//                    if (/[\u4E00-\u9FA5]/i.test($("#txtusername").val())) {
//                        alert('用户名请勿输入中文!');
//                        return false;
//                    }
//                    var pwd=$("#txtpassword").val();
//                    var patrn=/^(?=.*?[a-zA-Z])(?=.*?\d)(?=.*?[#@*_&.]).*$/;
//                    if (!patrn.test(pwd) || pwd.length <10 || pwd.length >18){
//                        alert('请输入10-18位由字母、数字、特殊字符(?[#@*_&.])组成的密码');
//                        return false;
//                    }
                    if(authentication.isEmpty(pwd)){
                        alert("请输入密码!");
                        return false;
                    }
                    if($("#").val() !=$("#txtpassword_confirm").val()){
                        alert("确认密码与密码不同,请重新输入!");
                        return false;
                    }
                });
            })
        </script>
    </body>
</html>
